﻿Imports System.Reflection


''' <summary>
''' 创建时间：2017.12.30
''' 作者：kevin zhu
''' 说明：获取程序集的类库      
''' </summary>
''' <typeparam name="T"></typeparam>
''' <remarks></remarks>
Friend Class AssemblyLib(Of T)
    Private _assemblyName1 As String
    ''' <summary>
    ''' 获取程序集名称      
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property AssemblyName As String
        Get
            Return _assemblyName1
        End Get
    End Property

    ''' <summary>
    ''' 创建时间：2017.12.29
    ''' 说明：返回程序集集合信息      
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function GetAssemblyName() As IList(Of T)

        Dim strAssembly As String = My.Application.GetType().Assembly.FullName
        Dim vAssemblyName As IList(Of T) = New List(Of T)(CType(strAssembly.Split(New String() {","}, StringSplitOptions.RemoveEmptyEntries), IEnumerable(Of T)))
        _assemblyName1 = vAssemblyName.Item(0).ToString
        Return vAssemblyName
    End Function
End Class
